#pragma once
#include "common/Singleton.h"
#include "common/HiveConfig.h"
#include "Common.h"

namespace AutomatedSurfaceReconstruction
{
	struct SFilter
	{
		int _FilterID;
		std::string _Sig;
		std::uint8_t _WorkThreadID;
		std::vector<Eigen::Vector2i> _Connections;
	};

	struct SPipe
	{
		std::string _Sig;
		std::uint8_t _WorkThreadID;
		int _SrcFilter;
		std::uint8_t _SrcFilterBufferID;
		int _DstFilter;
		std::uint8_t _DstFilterBufferID;
	};

	class CFilterPipeConfig : public hiveDesignPattern::CSingleton<CFilterPipeConfig>, public hiveConfig::CHiveConfig
	{
	public:
		~CFilterPipeConfig() = default;
		[[nodiscard]] bool init();
		bool isReady() const { return m_IsReady; }

		std::vector<SFilter> getFilterSet() { return m_FilterSet; }
		std::vector<SPipe> getPipeSet() { return m_PipeSet; }

	private:
		CFilterPipeConfig() = default;
		virtual void __defineAttributesV() override;

		bool m_IsReady = false;

		std::vector<SFilter> m_FilterSet;
		std::vector<SPipe> m_PipeSet;

		friend class hiveDesignPattern::CSingleton<CFilterPipeConfig>;
	};
}